﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="LFractal.LEntityEditor"
	x:Name="mainWindow"
	Title="MainWindow"
	Width="350" Height="480" 
	WindowStyle="None"
  ResizeMode="NoResize"
  ShowInTaskbar="False"
  AllowsTransparency="True"
  mc:Ignorable="d" MouseLeftButtonDown="mainWindow_MouseLeftButtonDown"
  >
	<Window.Background>
		<SolidColorBrush/>
	</Window.Background>
	<Border BorderBrush="Gray"           
            BorderThickness="0,0,2,2"
            CornerRadius="10"
            Background="#FFE8ECF4">
      <!-- Create space between shadow and the next border -->
      <Border BorderBrush="Transparent"
              BorderThickness="5"
              CornerRadius="10" Margin="0,0,0,0">
        <!-- The inner border -->
        <Border BorderBrush="Black"
                BorderThickness="1.5"
                CornerRadius="10">
        	<Grid>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="25" />
        			<RowDefinition Height="25" />
        			<RowDefinition Height="25" />
        			<RowDefinition Height="25" />
                    <RowDefinition Height="25" />
                    <RowDefinition Height="25" />
        			<RowDefinition Height="30" />
        			<RowDefinition Height="*" />
                    <RowDefinition Height="25" />
        			<RowDefinition Height="35" />
        		</Grid.RowDefinitions>
        		<Button Click="Button_Click" Grid.Row="9" Content="Cancel" Margin="5" HorizontalAlignment="Left" Width="50" >
        			<Button.Background>
        				<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
        					<GradientStop Color="#FFF3F3F3" Offset="0"/>
        					<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
        					<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
        					<GradientStop Color="#FFD3929C" Offset="1"/>
        				</LinearGradientBrush>
        			</Button.Background>
        		</Button>
				<Button Name="btnAddRule" Grid.Row="9" Content="+" HorizontalAlignment="Center" Margin="5" Width="25" Click="btnAddRule_Click">
					<Button.Background>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#FFF3F3F3" Offset="0"/>
							<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
							<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
							<GradientStop Color="#FFB4EEA4" Offset="1"/>
						</LinearGradientBrush>
					</Button.Background>
				</Button>

                <Button  Name="btnRender" Grid.Row="9" Content=">>" HorizontalAlignment="Right" Margin="5" Width="25" Click="btnRender_Click"  >
					<Button.Background>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#FFF3F3F3" Offset="0"/>
							<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
							<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
							<GradientStop Color="#FF88CD31" Offset="1"/>
						</LinearGradientBrush>
					</Button.Background>
				</Button>
        		<Label  HorizontalAlignment="Left" Margin="2,1,2,1" Content="Name :&#xd;&#xa;" FontWeight="Bold" Grid.Row="0" />
        		<TextBox Name="txtName" HorizontalAlignment="Left" Margin="55.987,1,0,1" Text="MyTree" AcceptsReturn="False" Grid.Row="0"  Width="260" BorderThickness="2" />
				
        		<Label HorizontalAlignment="Left" Margin="2,1,0,1" Content="Axiom :&#xa;" FontWeight="Bold" Grid.Row="2" />
        		<TextBox Name="txtAxiom" HorizontalAlignment="Left" Margin="55.367,1,0,1" Text="F" TextWrapping="NoWrap" Width="260" BorderThickness="2" Grid.Row="2"  />
				<StackPanel Orientation="Horizontal" Grid.Row="6">
					<Label HorizontalAlignment="Left" Margin="2,1,0,1" Content="Production Rules :&#xa;" FontWeight="Bold"  />
					<Button Content="?" ToolTip="Need help with syntax &amp; rules" HorizontalAlignment="Center" Margin="5" Width="25" Height="20" >
					<Button.Background>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#FFF3F3F3" Offset="0"/>
							<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
							<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
							<GradientStop Color="#FFB4EEA4" Offset="1"/>
						</LinearGradientBrush>
					</Button.Background>
				</Button>
				</StackPanel>
				<ListView Margin="3" Grid.Row="7" Name="listviewProductionRules">
					<ListView.View>
						<GridView>
							<GridViewColumn Header="Replace" Width="50">
								<GridViewColumn.CellTemplate>
									 <DataTemplate>
							              <TextBox Text="{Binding Path=NonTerminal}" Width="25" />
							          </DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
							<GridViewColumn Header="With" Width="250">
								<GridViewColumn.CellTemplate>
									<DataTemplate>
							            <TextBox Text="{Binding Path=Rule}" Width="250" />
							         </DataTemplate>
                 				</GridViewColumn.CellTemplate>
							</GridViewColumn>
						</GridView>
					</ListView.View>
				</ListView>
                    <StackPanel Grid.Row="4" Orientation="Horizontal">
                        <Label FontWeight="Bold">Origin:</Label>
                        <TextBox Name="txtOrigin" Text="0.5,0.5" Width="50" BorderBrush="LightBlue" BorderThickness="1" Margin="2" />
                        <Label FontWeight="Bold">Scaling factor:</Label>
                        <TextBox Name="txtScalingFactor" Text="-0.75" Width="50" BorderBrush="LightBlue" BorderThickness="1" Margin="2" />
                    </StackPanel>
                    <StackPanel Grid.Row="8" Orientation="Horizontal">
                        <Label FontWeight="Bold">Length:</Label>
                        <TextBox Name="txtLength" Text="50" Width="50" BorderBrush="LightBlue" BorderThickness="1" Margin="2" />
                        <Label FontWeight="Bold">Alpha:</Label>
                        <TextBox Name="txtAlpha" Text="90" Width="30" BorderBrush="LightBlue" BorderThickness="1" Margin="2" />
                        <Label FontWeight="Bold">Delta:</Label>
                        <TextBox Name="txtDelta" Text="90" Width="30" BorderBrush="LightBlue" BorderThickness="1" Margin="2" />
                        <Button Content="?" ToolTip="What's all these?" Margin="1" Width="25" Height="20" >
                            <Button.Background>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                    <GradientStop Color="#FFF3F3F3" Offset="0"/>
                                    <GradientStop Color="#FFEBEBEB" Offset="0.5"/>
                                    <GradientStop Color="#FFDDDDDD" Offset="0.5"/>
                                    <GradientStop Color="#FFB4EEA4" Offset="1"/>
                                </LinearGradientBrush>
                            </Button.Background>
                        </Button>
                    </StackPanel>
                </Grid>	
        </Border>
      </Border>
    </Border>
</Window>